### Variables
$mainMod   = SUPER
$hyprDir   = ~/.config/hypr
$wallpaper = ~/.wallpapers/wallpaper.jpg
# $term = foot
$term = kitty

### Binds
# MAIN
bind = $mainMod SHIFT, Return, exec, $term
bind = $mainMod,       D,      exec, $term
bind = $mainMod,       Q,      killactive,
bind = $mainMod,       E,      fullscreen,
bind = $mainMod SHIFT, M,      exec, rofi-loginmenu
bind = $mainMod,       P,      exec, hyprpicker | wl-copy
bind = $mainMod,       Space,  togglefloating
bind = $mainMod,       R,      exec, fuzzel
bind = $mainMod CTRL,  L,      exec, swaylock

# master
bind = $mainMod, Return, layoutmsg, swapwithmaster master

# groups
bind = $mainMod,       T,      togglegroup
bind = $mainMod,       Comma,  changegroupactive, b
bind = $mainMod,       Period, changegroupactive, f
bind = $mainMod SHIFT, Space,  moveoutofgroup

# Screenshot
bind = ,      Print, exec, grim -cg "$(slurp -doc 00000000)" - | wl-copy -t image/png 
bind = SHIFT, Print, exec, grim -c - | wl-copy -t image/png

# WINDOWS
# Move focus, vim style
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d

# Swap window, vim style
binde=$mainMod ALT SHIFT, L, swapwindow, r
binde=$mainMod ALT SHIFT, H, swapwindow, l
binde=$mainMod ALT SHIFT, K, swapwindow, u
binde=$mainMod ALT SHIFT, J, swapwindow, d

# Move window, vim style
binde=$mainMod SHIFT, L, moveactive, 20 0
binde=$mainMod SHIFT, H, moveactive, -20 0
binde=$mainMod SHIFT, K, moveactive, 0 -20
binde=$mainMod SHIFT, J, moveactive, 0 20

# Resize, vim style
binde=$mainMod ALT, L, resizeactive, 20 0
binde=$mainMod ALT, H, resizeactive, -20 0
binde=$mainMod ALT, K, resizeactive, 0 -20
binde=$mainMod ALT, J, resizeactive, 0 20

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# WORKSPACES
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Passthrough mode like in River
bind = $mainMod, F11, submap, passthrough
submap = passthrough
bind = $mainMod, F11, submap, reset
submap = reset
